<%--
 - Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 - 
 - This software is the confidential and proprietary information of ETCORE Labs. 
 - You shall not disclose such confidential information and shall use it only
 - in accordance with the terms of the license agreement you entered into
 - with ETCORE Labs.
 -
 - Support can be obtained from support forums at:
 - http://www.etcore.com/
 -
 - @author: ETCORE GroupTalk developers
 -
 --%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://www.etcore.com/grouptalk" prefix="grouptalk"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/core" prefix="c"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<c:set var="directoriesId" value="directories3" />
<c:set var="rootGroupsId" value="rootGroups3" />
<c:set var="rootGroupsSizeId" value="rootGroups3Size" />

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><c:out value="${context.platform3 }" />-<c:out
	value="${context.title }" /></title>
<link rel="stylesheet" href="/group/css/styles.css" type="text/css">
<script>
var width=window.screen.width;
 
var out_width="280";
var n=2;
if(width>=1600){
n=3;
out_width="420";
}else if(width<=800){
n=1;
out_width="240";	
}

</script>

<script>

function addBookmark(title,url) {
if (window.sidebar) {  
window.sidebar.addPanel(title, url,"");  
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}
 

function getXPos(o){
    var x = 0;
    do{
        x += o.offsetLeft;
      
    }while(o=o.offsetParent);
    return x;
}
function getYPos(o){
    var  y = 0;
    do{
    
        y += o.offsetTop;
    }while(o=o.offsetParent);
    return y;
}
function showTopics(id){

	 var elements=document.getElementsByTagName("table");
	 for(var i=0;i<elements.length;i++){
		 if(elements[i].className=="topics")
		 elements[i].style.display="none";
	 }
	var topicsElement=document.getElementById(id);
	topicsElement.style.display="";	
}

function showBookmarks(id){

 var elements=document.getElementsByTagName("div");
 for(var i=0;i<elements.length;i++){
	 if(elements[i].className=="topicDiv")
	 elements[i].style.display="none";
 }
 
	var bookmarkElement=document.getElementById(id);
	bookmarkElement.style.display="";
	var main=document.getElementById("main");
 
	bookmarkElement.style.top=getYPos(main);
 
	bookmarkElement.style.left=getXPos(main) ;

 
}
function hideBookmarks(id){
 
	var bookmarkElement=document.getElementById(id);
 
	bookmarkElement.style.display="none";
 

 
}
 
</script>
<script>
function showSub(id){

	var submenu=document.getElementById('sub'+id);
	var parentmenu=document.getElementById('root'+id);
	var gif=document.getElementById('img'+id);
 
	if(	submenu.style.display=="none")  {
		submenu.style.display="block";
		submenu.style.left=parentmenu.style.left;
		gif.src="/group/images/minus.gif";
 
	}
	else {
		submenu.style.display="none";
		gif.src="/group/images/plus.gif";
 
	}
	

}




</script>
</head>





<body bottomMargin=0 leftMargin=10 topMargin=0 onload=preloadImages()
	rightMargin=10 marginheight="0">


<c:import url="/group/ui-component/divdialog/divdialog.html" />
<TABLE cellSpacing=0 cellPadding=0 width=100% border=0 align=center>
	<%-- //////////////////////banner --%>
	<c:if test="${hasBanner}">
		<tr>
			<td><c:import url="/banner.jsp?currentPlatform=3" /></td>
		</tr>
	</c:if>




	<tr>

		<td>

		<table cellSpacing=0 cellPadding=0 width=100%>
			<tr>
				<td valign=top nowrap >
				<div
					style="   border: 1px solid #D6E0FC; margin-top: 5px;">
				<table  cellSpacing=0 cellPadding=0>
					<tr>
						<td><A style="font-weight: bold"
							href="/group/bookmarks<c:out value="${context.postfix}" />"><c:out
							value="${context.platform3}" /></A></td>
					</tr>

					<c:forEach var="directory" items="${directories3}">
						<tr>
							<td>
							<div>

							<div id="root<c:out value='${directory.id }' />"
								style="height: 25px; cursor: pointer"
								onclick="showSub('<c:out value='${directory.id }' />')">
							<table>
								<tr>
									<td><img id="img<c:out value='${directory.id }' />"
										src="/group/images/plus.gif" border=0 /><img
										src="/group/images/dir.gif" border=0 /></td>
									<td nowrap><c:out value='${directory.name}' /></td>
								</tr>
							</table>

							</div>
							<div id="sub<c:out value='${directory.id }' />" class="sub"
								style="position: relative; margin-left: 0; display: none; width: 160px; z-index: 1;">
							<table>
								<c:set var="groups" value="${directory.id }groups" />
								<c:forEach var="group" items="${requestScope[groups]}">
									<tr>
										<td nowrap style="overflow:hidden"><img src="/group/images/sub.gif" border=0><c:if
											test="${!context.encryptedUrl2}">
											<a
												href="/group/bookmarksView<c:out value='${context.postfix}'/>?gid=<c:out value='${group.id }'/>"><img
												src="/group/images/bookmark.gif" border=0 />&nbsp;<c:out
												value='${group.name }' /></a>
										</c:if> <c:if test="${context.encryptedUrl2}">
											<c:set var='urlFragmentStr' value='?gid=${group.id}' />
											<c:set var='urlFragment'
												value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
											<a
												href="/group/bookmarksView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><img
												src="/group/images/bookmark.gif" border=0 />&nbsp;<c:out
												value='${group.name }' /></a>
										</c:if></td>
									</tr>
								</c:forEach>
							</table>
							</div>

							</div>
							</td>
						</tr>
					</c:forEach>
					<c:forEach var="group" items="${rootGroups3}">
						<tr>
							<td nowrap
								style="height: 25px; padding-left: 10px; height: 25px;"><c:if
								test="${!context.encryptedUrl2}">
								<a
									href="/group/bookmarksView<c:out value='${context.postfix}'/>?gid=<c:out value='${group.id }'/>"><img
									src="/group/images/bookmark.gif" border=0 />&nbsp;<c:out
									value='${group.name }' /></a>
							</c:if> <c:if test="${context.encryptedUrl2}">
								<c:set var='urlFragmentStr' value='?gid=${group.id}' />
								<c:set var='urlFragment'
									value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
								<a
									href="/group/bookmarksView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><img
									src="/group/images/bookmark.gif" border=0 />&nbsp;<c:out
									value='${group.name }' /></a>
							</c:if></td>
						</tr>
					</c:forEach>
				</table>

				</div>



				</td>

				<td valign=top width=100% align=center><c:set
					var="directorySize" value="0" />





				<table width=100% align=center
					style="margin-left: 5px; margin-top: 3px;">
					<c:forEach var="directory" items="${requestScope[directoriesId] }">
						<c:set var="directorySize" value="1" />
						<tr>
							<td width=100% valign=top>

							<TABLE width=780 cellSpacing=0 cellPadding=0 align=left>

								<tr>
									<td valign=top colspan=3
										style="font-size: 15px; font-weight: bold;"><a
										name="${directory.id }"><c:out value='${directory.name }' /></a></td>
								</tr>

								<c:set var="seq" value="-1" />
								<c:set var="dgroups" value="${directory.id }groups" />

								<c:forEach var="group" items="${requestScope[dgroups]}">
									<c:set var="seq" value="${seq+1}" />
									<c:if test="${seq%3==0}">
										<tr>
									</c:if>
									<td align=center width=33% valign=top>

									<table width=100%>
										<tr>


											<td width=100% valign=top>

											<table cellspacing=3 cellpadding=0
												style="background: #ffffff;" width=100%>
												<tr>
													<td align=center><c:if
														test="${!context.encryptedUrl3}">
														<a
															style="color: #005EAC; font-weight: bold; font-size: 14px;"
															<c:if test="${not empty param.target}"> target=_top </c:if>
															href="/group/bookmarksView<c:out value='${context.postfix }'/>?gid=<c:out value='${group.id }'/>"><c:out
															value='${group.name }' /></a>
													</c:if> <c:if test="${context.encryptedUrl3}">
														<c:set var='urlFragmentStr' value='?gid${group.id}' />
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a
															style="color: #005EAC; font-weight: bold; font-size: 14px;"
															<c:if test="${not empty param.target}"> target=_top </c:if>
															href="/group/bookmarksView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:out
															value='${group.name }' /></a>
													</c:if></td>
												</tr>


												<tr>

													<td width=100% valign=top>
													<table width=260 cellspacing=0 cellpadding=0
														style="border: 1px solid #d2d4d2; margin-top: 2px; table-layout: fixed;">
														<tr>
															<td align=center width=220 nowrap
																style="color: #606060; border-bottom: 1px solid #d2d4d2"><c:out
																value='${context.msg_title}' /></td>
															<td width=40 align=center valign=top
																style="color: #606060; border-right: 1px solid #d2d4d2; border-bottom: 1px solid #d2d4d2">${context.text_click}</td>

														</tr>



														<c:set var='rank' value='0' />
														<c:set var="rowCount" value="0" />
														<c:set var="msgKey" value="${group.id}msgs" />

														<c:forEach var="message" items="${requestScope[msgKey]}">
															<c:set var='rank' value='${rank+1 }' />
															<tr>


																<td align=left nowrap
																	style="overflow-x: hidden; color: #808080; border-bottom: 1px solid #d2d4d2">&nbsp;${rank
																}.<a style="font-size: 12px; color: #707070;"
																	title="<c:out value='${message[9]}' />" target=_blank
																	href='<c:if test="${!(fn:startsWith(message[9],'http'))}">http://${message[9]}</c:if><c:if test="${(fn:startsWith(message[9],'http'))}">${message[9]}</c:if>'>
																<c:out value='${message[2]}' /></a></td>
																<td align=center width=40
																	style="color: #808080; font-weight: bold; border-right: 1px solid #d2d4d2; border-bottom: 1px solid #d2d4d2"><c:if
																	test="${!(context.msg_encryptedUrl) }">
																	<a style="font-size: 12px; color: #999999;"
																		href="/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />"
																		target=_blank>${message[5]}</a>
																</c:if> <c:if test="${(context.msg_encryptedUrl) }">
																	<c:set var='urlFragmentStr' value="?id=${message[0] }" />
																	<c:set var='urlFragment'
																		value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																	<a style="font-size: 12px; color: #999999;"
																		href="/group/messagedetail<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"
																		target=_blank>${message[5]}</a>
																</c:if></td>

															</tr>





														</c:forEach>

													</table>

													</td>
												</tr>


											</table>

											</td>
										</tr>
									</table>
									</td>


									<c:if test="${seq%3==2}">
										</tr>
									</c:if>

								</c:forEach>
								<c:if test="${seq%3!=2}">
									<td></td>
									</tr>
								</c:if>


							</table>
							</td>
						</tr>
						<tr>
							<td></td>
						</tr>
					</c:forEach>


					<c:if test="${requestScope[rootGroupsSizeId]>0 }">
						<tr>
							<td width=100%>
							<TABLE width=780 cellSpacing=0 cellPadding=0 align=left
								style="border-style: blue">
								<c:if test='${directorySize==1 }'>
									<tr>
										<td colspan=2>
										<table>
											<tr>
												<td><img src="/group/images/dir.gif" border=0 /></td>
												<td><c:out value='ROOT' /></td>
											</tr>
										</table>
										</td>
									</tr>
								</c:if>
								<c:set var="seq" value="-1" />
								<c:forEach var="group" items="${rootGroups3}">
									<c:set var="seq" value="${seq+1}" />
									<c:if test="${seq%3==0}">
										<tr>
									</c:if>
									<td align=center width=33% valign=top>

									<table width=100%>
										<tr>


											<td width=100% valign=top>

											<table cellspacing=3 cellpadding=0
												style="background: #ffffff;" width=100%>
												<tr>
													<td align=center><c:if
														test="${!context.encryptedUrl3}">
														<a
															style="color: #005EAC; font-weight: bold; font-size: 14px;"
															<c:if test="${not empty param.target}"> target=_top </c:if>
															href="/group/bookmarksView<c:out value='${context.postfix }'/>?gid=<c:out value='${group.id }'/>"><c:out
															value='${group.name }' /></a>
													</c:if> <c:if test="${context.encryptedUrl3}">
														<c:set var='urlFragmentStr' value='?gid${group.id}' />
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a
															style="color: #005EAC; font-weight: bold; font-size: 14px;"
															<c:if test="${not empty param.target}"> target=_top </c:if>
															href="/group/bookmarksView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:out
															value='${group.name }' /></a>
													</c:if></td>
												</tr>


												<tr>

													<td width=100% valign=top>
													<table width=260 cellspacing=0 cellpadding=0
														style="border: 1px solid #d2d4d2; margin-top: 2px; table-layout: fixed;">
														<tr>
															<td align=center width=220 nowrap
																style="color: #606060; border-bottom: 1px solid #d2d4d2"><c:out
																value='${context.msg_title}' /></td>
															<td width=40 align=center valign=top
																style="color: #606060; border-right: 1px solid #d2d4d2; border-bottom: 1px solid #d2d4d2">${context.text_click}</td>

														</tr>



														<c:set var='rank' value='0' />
														<c:set var="rowCount" value="0" />
														<c:set var="msgKey" value="${group.id}msgs" />

														<c:forEach var="message" items="${requestScope[msgKey]}">
															<c:set var='rank' value='${rank+1 }' />
															<tr>


																<td align=left nowrap
																	style="color: #808080; overflow-x: hidden; border-bottom: 1px solid #d2d4d2">&nbsp;${rank
																}. <a style="font-size: 12px; color: #707070;"
																	title="<c:out value='${message[9]}' />" target=_blank
																	href='<c:if test="${!(fn:startsWith(message[9],'http'))}">http://${message[9]}</c:if><c:if test="${(fn:startsWith(message[9],'http'))}">${message[9]}</c:if>'>
																<c:out value='${message[2]}' /></a></td>
																<td align=center width=40
																	style="color: #808080; font-weight: bold; border-right: 1px solid #d2d4d2; border-bottom: 1px solid #d2d4d2"><c:if
																	test="${!(context.msg_encryptedUrl) }">
																	<a style="font-size: 12px; color: #999999;"
																		href="/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />"
																		target=_blank>${message[5]}</a>
																</c:if> <c:if test="${(context.msg_encryptedUrl) }">
																	<c:set var='urlFragmentStr' value="?id=${message[0] }" />
																	<c:set var='urlFragment'
																		value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
																	<a style="font-size: 12px; color: #999999;"
																		href="/group/messagedetail<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"
																		target=_blank>${message[5]}</a>
																</c:if></td>

															</tr>





														</c:forEach>

													</table>

													</td>
												</tr>


											</table>

											</td>
										</tr>
									</table>
									</td>


									<c:if test="${seq%3==2}">
										</tr>
									</c:if>

								</c:forEach>
								<c:if test="${seq%3!=2}">
									<td></td>
									</tr>
								</c:if>

							</table>
							</td>
						</tr>

					</c:if>

				</table>
				</td>









			</tr>
		</table>
		</td>
	</tr>

	<c:if test="${hasFooter}">
		<tr>
			<td><BR>
			<BR>
			<c:import url="/footer.jsp" /></td>
		</tr>
	</c:if>


	</TBODY>
</TABLE>
</body>
</html>

